package de.projectgoodmorning.bluetooth;

import java.util.UUID;

import de.projectgoodmorning.util.ArgsValidator;

public class BluetoothCommunication {
	
	public static void startServer( Processable processable ) {
		startServer( getRandomUUID(), processable );
	}

	public static void startServer( String uuid, Processable processable ) {
		ArgsValidator.isNotNull( uuid, "uuid" );
		ArgsValidator.isNotNull( processable, "processable" );
		
		Thread serverThread = new ServerThread( uuid, processable );
		serverThread.start();
	}
	
	public static String getRandomUUID() {
		return UUID.randomUUID().toString();
	}
}
